/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Merlion.userManagement.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;


@Entity
public class TaskEntity implements Serializable {
  
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String title="";
    private String task="";
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dateCreated;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dateDue;
    private boolean reminder;
    private boolean expired;
    private String deleteFlag="N";
    private String ownerId;
    private String ownerName;
    private int reminderTime;
    @ManyToOne
    private SystemUserEntity systemUser;
    private int hourDue;
    private int minuteDue;
    private int secondDue;
    
    public TaskEntity(){}
    
    public void create(String ownerId, String ownerName, SystemUserEntity systemUser, String title, String task, 
                      Date dateCreated, Date dateDue, int hourDue, int minuteDue,
                       int secondDue, boolean reminder){
        this.setOwnerId(ownerId);
        this.setOwnerName(ownerName);
        this.setSystemUser(systemUser);
        this.setTitle(title);
        this.setTask(task);
        this.setDateCreated(dateCreated);
        this.setDateDue(dateDue);
        this.setHourDue(hourDue);
        this.setMinuteDue(minuteDue);
        this.setSecondDue(secondDue);
        this.setReminder(reminder);
    }

    public int getReminderTime() {
        return reminderTime;
    }

    public void setReminderTime(int reminderTime) {
        this.reminderTime = reminderTime;
    }

    
    
    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public boolean isExpired() {
        return expired;
    }

    public void setExpired(boolean expired) {
        this.expired = expired;
    }

    public int getHourDue() {
        return hourDue;
    }

    public void setHourDue(int hourDue) {
        this.hourDue = hourDue;
    }

    public int getMinuteDue() {
        return minuteDue;
    }

    public void setMinuteDue(int minuteDue) {
        this.minuteDue = minuteDue;
    }

    public String getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(String ownerId) {
        this.ownerId = ownerId;
    }

    public String getOwnerName() {
        return ownerName;
    }

    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }

    public int getSecondDue() {
        return secondDue;
    }

    public void setSecondDue(int secondDue) {
        this.secondDue = secondDue;
    }

    public SystemUserEntity getSystemUser() {
        return systemUser;
    }

    public void setSystemUser(SystemUserEntity systemUser) {
        this.systemUser = systemUser;
    }
    
    
    
    public Date getDateCreated() {
        return dateCreated;
    }

    public void setDateCreated(Date dateCreated) {
        this.dateCreated = dateCreated;
    }

    public Date getDateDue() {
        return dateDue;
    }

    public void setDateDue(Date dateDue) {
        this.dateDue = dateDue;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTask() {
        return task;
    }

    public void setTask(String task) {
        this.task = task;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public boolean isReminder() {
        return reminder;
    }

    public void setReminder(boolean reminder) {
        this.reminder = reminder;
    }
    
    
    
    
}
